# Maintainer: Daenyth <Daenyth+Arch AT gmail DOT com>
# Contributor: Daenyth <Daenyth+Arch AT gmail DOT com>
pkgname=pkgtools
pkgver=24
pkgrel=4
pkgdesc="A collection of scripts for Arch Linux packages"
arch=('any')
url="http://bbs.archlinux.org/viewtopic.php?pid=384196"
license=('GPL')
source=(v$pkgver::http://github.com/Daenyth/pkgtools/tarball/v$pkgver)
backup=('etc/pkgtools/newpkg.conf' 'etc/pkgtools/spec2arch.conf')
install=pkgtools.install
provides=(newpkg)
depends=('bash>=4' 'python')
optdepends=('abs: Provides proto packaging files for newpkg'
            'python-yaml: for gem2arch'
            'python2: for pkgconflict')
md5sums=('f139c3940e1038cac4e29e985089e8a8')

build() {
  cd "$srcdir/Daenyth-$pkgname"-*

  make
}

package() {
  cd "$srcdir/Daenyth-$pkgname"-*

  make DESTDIR="$pkgdir" install

  # remove pkgfile
  rm "$pkgdir/usr/bin/pkgfile"
  rm -r "$pkgdir/usr/lib"
  rm "$pkgdir/etc/pkgtools/pkgfile.conf"
  rm -r "$pkgdir/etc/cron.daily"
  rm -r "$pkgdir/var"
  rm "$pkgdir"/usr/share/pkgtools/pkgfile-hook.{bash,zsh}
  rm "$pkgdir"/etc/profile.d/pkgfile-hook.sh
  rmdir "$pkgdir"/etc/profile.d
}

# vim:set ts=2 sw=2 et:
